﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{$base.username}个人专栏-EHS中国-</title>
    <link href="__TMPL__style/group-style.css" rel="stylesheet" type="text/css" />
    <load href="__PUBLIC__/Css/lwy2011.css" />
    <script type="text/javascript" src="__ROOT__/Public/Js/jquery-1.5.0.min.js"></script>
    <script type="text/javascript" src="__ROOT__/Public/Js/ehs.js"></script>
  </head>
  <body>
    <layout name="Public:header0523" cache="0" />
    <div class="main">
      <layout name="Public:group-member-base" cache="0" />
      <div class="content">
        <div class="column_left">
          <layout name="publicl-left-header" cache="0" />
          <div class="column-cont">
            <div class="state"><strong>声明：</strong>ehs.cn专家专栏文章属专家原创内容，代表个人观点，授权于ehs.cn使用；如需转载请保留原意并注明来源：ehs.cn，作者：ehs.cn专家－{$base['username']}，请尊重原创！
            </div>
            <div class="column-cont-list">
              <volist name="newest['diary']['list']" id="item">
                <dl>
                  <dt><h3><a href="/column/diary_{$uid}_{$item['did']}.html" target="_blank">{$item['subject']}</a></h3></dt>
                  <dd class="publish-time">发表于:<?=date('Y-m-d/H:i:s',$item['postdate'])?></dd>
                  <dd>
                    <div class="btn_tj" id="d_{$item['did']}" onclick="setPromote('d',{$item['did']})" style="cursor:pointer">{$item['recommend_num']}<span>已推荐</span></div>
                    	{$item['content']}
                    <div>...</div>
                  </dd>
                  <dd class="column-cont-bottom"><a href="/column/diary_{$uid}_{$item['did']}.html">阅读</a>({$item.r_num}) |<a href="/column/diary_{$uid}_{$item['did']}.html#comment">评论</a>({$item.c_num})</dd>
                </dl>
              </volist>
              <div class="column-paging"><div class='yahoo'>{$newest['diary']['nav']}</div></div>
            </div>
          </div>
        </div>
        <layout name="public-right" cache="0" />
        <div class="clear"></div>
      </div>
      <div class="footer"><layout name="Public:footer" cache="0" /></div>
    </div>
    <script>
      var doneList=new Array();
      function setPromote(type,id){
        var doneFlag=false;
        for(var i=0; i<doneList.length ;++i){
          if(doneList[i]==type+'_'+id){
            doneFlag=true;
            break;
          }
        }
        if(!doneFlag){
          //document.write('__URL__/setPromoteAjax/type/'+type+'/uid/'+{$uid}+'/id/'+id);
          $.getJSON('__URL__/setPromoteAjax/type/'+type+'/isAjax/1/id/'+id,
          function(data){
            var num=parseInt(data.result);
            if(num>0){
              $('#'+type+'_'+id).html(num+"<span>已推荐</span>");
              doneList.push(type+'_'+id);
              alert('推荐成功');
            }
          }
        );
        }else{alert('您已经推荐过该文章了');}
      }
    </script>
  </body>
</html>